import { Http } from '@/network/request'
import { SubmitDTO } from './data'

// 提交
export const saveOrUpdate = (data: SubmitDTO) => {
  return Http.post<typeof data, null>('/code-duck-question/saveOrUpdateQuestion', data, { typeStr: data.id ? '更新' : '新增' })
}


// 获取题目分类列表
export const getQuestionCategoryList = () => {
  return Http.post('/admin/codeDuckQuestionCategory/listQuestionCategory', {
    name: ''
  })
}

// 获取题目标签列表
export const getQuestionTagList = () => {
  return Http.post('/codeDuckTag/list', {
    name: ''
  })
}